﻿

-- =============================================
-- Author:		Naresh N Jamadagni
-- Create date: 21 May 2012
-- Description:	Delets all the processes for specified computer
-- =============================================
CREATE PROCEDURE [dbo].[AddEventLogEntry]
(
			@ComputerId int,
            @LogFile nvarchar(100),
            @RecordNumber int,
            @Category nvarchar(100),
            @EventIdentifier int,
            @EventTypeId tinyint,
            @Message nvarchar(max),
            @SourceName nvarchar(300),
            @TimeGenerated datetime,
            @TimeWritten datetime,
            @User nvarchar(50)
)
AS

BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
   INSERT INTO [dbo].[EventLog]
           ([ComputerId]
           ,[LogFile]
           ,[RecordNumber]
           ,[Category]
           ,[EventIdentifier]
           ,[EventTypeId]
           ,[Message]
           ,[SourceName]
           ,[TimeGenerated]
           ,[TimeWritten]
           ,[User])
     VALUES
           (@ComputerId,
           @LogFile,
           @RecordNumber,
           @Category,
           @EventIdentifier,
           @EventTypeId,
           @Message,
           @SourceName,
           @TimeGenerated,
           @TimeWritten,
           @User);
END



